package cn.hdustea.shopNavigation.ui.presenter

import cn.hdustea.shopNavigation.entity.MarketSelect
import cn.hdustea.shopNavigation.ui.contract.MarketSelectContract
import cn.hdustea.shopNavigation.ui.model.MarketSelectModel
import com.hdustea.base.base.BasePresenter

/**
 * <pre>
 *     author : HuQiang
 *     time   : 2020/09/25
 *     desc   :
 *     version: 1.0
 * </pre>
 */
class MarketSelectPresenter(mView: MarketSelectContract.View) : BasePresenter<MarketSelectContract.View, MarketSelectContract.Model>(mView), MarketSelectContract.Presenter {

    override fun getModel(): MarketSelectContract.Model = MarketSelectModel()

    override fun getMarketList() {
        mModel.getMarketList(object : PresenterCallback<MutableList<MarketSelect>>() {
            override fun callback(data: MutableList<MarketSelect>) {
                mView?.dismissLoading()
                mView?.setCityList(data)
            }
        })
    }

} 